﻿create procedure [dbo].[usp_TargetSiteUpdate]
	@TargetSiteId int
	, @ConcurrencyId timestamp
	, @ContainsGenericParameters bit
	, @DeclaringType nvarchar(255)
	, @IsAbstract bit
	, @IsAssembly bit
	, @IsConstructor bit
	, @IsFamily bit
	, @IsFamilyAndAssembly bit
	, @IsFamilyOrAssembly bit
	, @IsFinal bit
	, @IsGenericMethod bit
	, @IsGenericMethodDefinition bit
	, @IsHideBySignature bit
	, @IsPrivate bit
	, @IsPublic bit
	, @IsSpecialName bit
	, @IsStatic bit
	, @IsVirtual bit
	, @MemberType nvarchar(255)
	, @Module nvarchar(255)
	, @Name nvarchar(255)
as

begin try
	
	begin transaction
	
		update [dbo].[TargetSite]
		set
		    [ContainsGenericParameters] = @ContainsGenericParameters
		    , [DeclaringType] = @DeclaringType
			, [IsAbstract] = @IsAbstract
			, [IsAssembly] = @IsAssembly
			, [IsConstructor] = @IsConstructor
			, [IsFamily] = @IsFamily
			, [IsFamilyAndAssembly] = @IsFamilyAndAssembly
			, [IsFamilyOrAssembly] = @IsFamilyOrAssembly
			, [IsFinal] = @IsFinal
			, [IsGenericMethod] = @IsGenericMethod
			, [IsGenericMethodDefinition] = @IsGenericMethodDefinition
			, [IsHideBySignature] = @IsHideBySignature
			, [IsPrivate] = @IsPrivate
			, [IsPublic] = @IsPublic
			, [IsSpecialName] = @IsSpecialName
			, [IsStatic] = @IsStatic
			, [IsVirtual] = @IsVirtual	
			, [MemberType] = @MemberType
			, [Module] = @Module
			, [Name] = @Name
		where [TargetSiteId] = @TargetSiteId and [ConcurrencyId] = @ConcurrencyId
		
	commit transaction

end try
	
begin catch
	if @@trancount > 0
	begin
		rollback transaction;
	end
	execute [dbo].[usp_SqlErrorInsert]
end catch


